$(function(){
// 首页引入图表--左
var myChart = echarts.init(document.getElementById('main-left'));
var option = {
    title: {
        text: '注册人数表'
    },
    tooltip: {},
    legend: {
        data:['人数','销量']
    },
    xAxis: {
        type: 'category',
        data: ['一月', '二月', '三月', '四月', '五月', '六月']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        name:'人数',
        data: [120, 200, 150, 80, 70, 110, 130],
        type: 'bar'
    },
    {
        name:'销量',
        data: [120, 200, 150, 80, 70, 110, 130],
        type: 'line'
    }
]
}
myChart.setOption(option);
// 首页引入图表--右
var myChart = echarts.init(document.getElementById('main-right'));
var option = {
    title: {
        text: '会员分布'
    },
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b}: {c} ({d}%)"
    },
    legend: {
        orient: 'vertical',
        x: 'right',
        data:['北京','上海','广州','南京','苏州']
    },
    series: [
        {
            name:'会员分布',
            type:'pie',
            radius: ['50%', '70%'],
            avoidLabelOverlap: false,
            label: {
                normal: {
                    show: false,
                    position: 'center'
                },
                emphasis: {
                    show: true,
                    textStyle: {
                        fontSize: '30',
                        fontWeight: 'bold'
                    }
                }
            },
            labelLine: {
                normal: {
                    show: false
                }
            },
            data:[
                {value:335, name:'北京'},
                {value:310, name:'上海'},
                {value:234, name:'广州'},
                {value:135, name:'南京'},
                {value:1548, name:'苏州'}
            ]
        }
    ]
}
myChart.setOption(option);

})